﻿@using Webdiyer.WebControls.Mvc
@model PagedList<RBS.Core.Model.manager_log>
@{
    ViewBag.Title = "日志管理";
    Layout = "~/Views/Shared/_Layout.cshtml"; 
}
<script>
    $(function () {
        $("#btnDelete").click(function () {
            var url = '@Url.Action("LogDelete")';
            $.ajax({
                url: url,
                type: "post",
                dataType: 'json',
                success: function (data) {
                    if (data.IsSuccess) {
                        loadPage(data.Data);
                    }
                    else {
                        //  $("#msgtip").text(data.Msg);
                        $.dialog.alert(data.Msg);
                    }
                }
            });
            return false;
        });
    });
</script>
<div class="location">
    <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
    <a href="@Url.Action("Main", "Home")" class="home"><i></i><span>首页</span></a>
    <i class="arrow"></i><span>管理日志</span>
</div>
<!--/导航栏-->
<!--工具栏-->
<div class="toolbar-wrap">
    <div id="floatHead" class="toolbar">
        <div class="l-list">
            <ul class="icon-list">
                <li>
                    <a id="btnDelete" class="del" href="#"><i></i><span>删除日志</span></a>
                </li>
            </ul>
        </div>
        <div class="r-list">
            @using (Html.BeginForm("LogManage", "Sys", new RouteValueDictionary { { "id", "" } }, FormMethod.Get))
            {
                <input id="kword" name="kword" type="text" class="keyword" value="@Request.QueryString["kword"]"/>
                <input type="submit" value="查询" class="btn-search" accesskey="S" /> 
            }
        </div>
    </div>
</div>
<!--/工具栏-->

<!--列表-->

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
    <tr>
        <th width="10%">用户名
        </th>
        <th width="15%">操作类型
        </th>
        <th align="left">备注
        </th>
        <th align="left" width="15%">用户IP
        </th>
        <th align="left" width="12%">添加时间
        </th>
    </tr>

    @if (null != ViewData.Model)
    {
        foreach (var item in ViewData.Model)
        {
        <tr>
            <td align="center">
                @Html.ActionLink(item.user_name, "LogManage", new { kword = item.user_name })
            </td>
            <td align="center">
                @Html.ActionLink(item.action_type, "LogManage", new { kword = item.action_type })
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.remark)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.user_ip)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.add_time)
            </td>
        </tr>
        }
    }
</table>


<!--/列表-->

<!--内容底部-->
<div class="line20">
</div>
<div class="pagelist">
    <div class="l-btns"> 
        <span>显示</span> <span>10 条/页</span><span>共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</span>
    </div>
    @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "id",  ShowPageIndexBox = true, PageIndexBoxType = PageIndexBoxType.DropDownList, ShowGoButton = false ,CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>"},new {id="PageContent",@class="default"})
    @section Scripts{@{Html.RegisterMvcPagerScriptResource();}}
</div>



<!--/内容底部-->
